//
//  JMCustomView.m
//  OpenSesame
//
//  Created by zhangjiaming on 15/12/29.
//  Copyright © 2015年 OpenSesame. All rights reserved.
//

#import "JMCustomView.h"

@implementation JMCustomView
+ (instancetype)customViewWithLeftImage:(NSString *)leftImage andRightImage:(NSString *)rightImage {
    return [[[self alloc]init] customViewWithLeftImage:leftImage andRightImage:rightImage];
}

- (JMCustomView *)customViewWithLeftImage:(NSString *)leftImage andRightImage:(NSString *)rightImage {
    UIButton *left = [UIButton buttonWithType:UIButtonTypeCustom];
    [left setImage:[UIImage imageNamed:leftImage] forState:UIControlStateNormal];
    left.frame = CGRectMake(0, 0, 25, 40);
    [self addSubview:left];
    
    UIButton *right = [UIButton buttonWithType:UIButtonTypeCustom];
    [right setImage:[UIImage imageNamed:rightImage] forState:UIControlStateNormal];
    right.frame = CGRectMake(40, 2, 40, 40);
    [self addSubview:right];
    self.height = 40;
    return self;
}
@end
